package com.demo.config;

import com.demo.service.IntelligentScheduleService;
import com.demo.service.impl.IntelligentScheduleServiceImpl;
import com.demo.service.impl.SimpleScheduleServiceImpl;
import com.demo.service.impl.SmartScheduleServiceImpl;
import com.demo.service.impl.AdvancedScheduleServiceImpl;
import com.demo.service.impl.GeneticScheduleServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * 排课服务配置类
 */
@Configuration
public class ScheduleServiceConfig {
    
    /**
     * 智能排课服务（主要实现）
     */
    @Bean("intelligentScheduleService")
    @Primary
    public IntelligentScheduleService intelligentScheduleService() {
        return new IntelligentScheduleServiceImpl();
    }
    
    /**
     * 简单排课服务（备用实现）
     */
    @Bean("simpleScheduleService")
    public IntelligentScheduleService simpleScheduleService() {
        return new SimpleScheduleServiceImpl();
    }
    
    /**
     * 智能排课服务（考虑教师课程对应关系）
     */
    @Bean("smartScheduleService")
    public IntelligentScheduleService smartScheduleService() {
        return new SmartScheduleServiceImpl();
    }
    
    /**
     * 高级智能排课服务（支持班级选择、课时限制、冲突避免等）
     */
    @Bean("advancedScheduleService")
    public AdvancedScheduleServiceImpl advancedScheduleService() {
        return new AdvancedScheduleServiceImpl();
    }

    /**
     * 遗传算法排课服务
     */
    @Bean("geneticScheduleService")
    public GeneticScheduleServiceImpl geneticScheduleService() {
        return new GeneticScheduleServiceImpl();
    }
}




